<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('查看鉴定报告')"/>
    <th:block th:include="include :: datetimepicker-css"/>
    <th:block th:include="include :: summernote-css"/>
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-report-detail" th:object="${idReport}">
        <input name="id" th:field="*{id}" type="hidden">
        <h4 class="form-header h4">关联案件</h4>
        <input id="registerId" name="registerId" th:field="*{registerId}" class="form-control" type="hidden">
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">送鉴单位：</label>
                    <div class="col-sm-8">
                        <input id="sendUnitId" readonly placeholder="请选择关联案件"
                               class="form-control" type="text" required>
                    </div>
                </div>
            </div>

            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">来文文号：</label>
                    <div class="col-sm-8">
                        <input id="documentNum" readonly class="form-control" type="text" required>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">

            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label ">样本类别：</label>
                    <div class="col-sm-8">
                        <input id="category" class="form-control" type="text" readonly required>
                    </div>
                </div>
            </div>


        </div>


        <h4 class="form-header h4">出版意见</h4>
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label class="col-sm-2 control-label ">出版意见：</label>
                    <div class="col-sm-10">
                        <!--             type="hidden"  class="myhide"          width设置为0，高度设置为0.5px-->
                        <input name="publishOps" th:field="*{publishOps}" style="visibility: hidden;" >
                        <br/>
                        <div class="file-loading">
                            <input class="form-control file-upload" id="publishOps" name="file" type="file">
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <h4 class="form-header h4">鉴定结论</h4>
        <input id="GetAppraConInfo" th:value="${idReport.appraCon}" type="hidden">
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">鉴定结论：</label>
                    <div class="col-sm-8">
                        <select id="appraCon" name="appraCon" class="form-control"
                                th:with="type=${@dict.getType('id_report_conclusion')}" required>
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                    th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div id="ChangeContent"></div>

        <h4 class="form-header h4">关联样本</h4>
        <div class="row">
            <!--            <div class="col-sm-6">-->
            <!--                <button type="button" class="btn btn-w-m btn-primary" onclick="selectReportToSample()">关联样本</button>-->
            <!--            </div>-->
            <div class="col-sm-6">
                <input class="form-control" th:value="${idReport.sampleIds}" id="sampleIds" name="sampleIds"
                       style="visibility: hidden;" required>
            </div>
        </div>


        <!--            <div class="form-group">-->
        <!--                <label class="col-sm-3 control-label">关联样本：</label>-->
        <!--                <div class="col-sm-8">-->
        <!--                    <textarea name="sampleIds" class="form-control"></textarea>-->
        <!--                </div>-->
        <!--            </div>-->


        <div id="samples">

        </div>

        <div class="row hide" id="approvalBox">
            <div class="col-sm-offset-5 col-sm-10">
                <button style="font-size: 15px" type="button" class="btn btn-warning btn-xs" onclick="submitApproval()">
                    <i
                            class="fa fa-check"></i>审批
                </button>&nbsp;
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: summernote-js"/>
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script src="/ajax/libs/template/template.js"></script>
<script th:inline="javascript">
    var prefix = ctx + "publish/report";
    // 获取已经审核人员
    var approvalUser = [[${idReport.appRemark}]];
    // 审核状态
    var approvalStatus = [[${idReport.status}]];
    // 审核人员
    var auditorUser = [[${idReport.auditorId}]];
    // 登录人
    var loginUser = [[${userid}]];
    $("#form-report-add").validate({
        focusCleanup: true
    });

    function initApproval() {
        // 无审批权限
        var flag = false;
        // 有审批权限
        if (auditorUser) {
            if (filter(auditorUser.split(","), loginUser)) {
                flag = true;
            }
        }
        // 已经审核
        if (approvalUser) {
            if (filter(approvalUser.split(","), loginUser)) {
                flag = false;
            }
        }

        // 显示审批按钮
        if (flag) {
            $('#approvalBox').removeClass("hide");
        }

        function filter(arrayList, id) {
            var resultOk = false;
            for (var i = 0, end = arrayList.length; i < end; i++) {
                if (arrayList[i] == id) {
                    resultOk = true;
                    break;
                }
            }
            return resultOk;
        }
    }

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-report-detail').serialize());
        }
    }

    //获取送检信息
    function findById() {
        var registerId = $("#registerId").val();
        if($.common.isNotEmpty(registerId)){
            $.ajax({
                type: "post",
                url: ctx + "publish/register/findById/" + registerId,
                dataType: 'json',
                success: function (result) {
                    $("#sendUnitId").val(result.sendUnit);
                    $("#documentNum").val(result.documentNum);
                    $("#category").val(result.category);
                },
                error: function (error) {
                    $.modal.alertWarning("查询鉴定受理登记记录失败！");
                }
            });

        }

    }

    findById();

    /*console.log($("#illegal").html());
    function GetAppraConInfo() {
        var _appraCon = $("#GetAppraConInfo").val();
        var samepleId = 'legal'
        if (_appraCon == "合法出版物") {
            samepleId = 'legal';
        } else if (_appraCon == "非法出版物") {
            samepleId = 'illegal';
        }
        var htmls = $(eval(samepleId)).html();
        $("#ChangeContent").empty();
        $("#ChangeContent").append(htmls);
    }

    GetAppraConInfo();*/
    function selectReportToRegister() {
        $.modal.open("关联案件", "/publish/register/registerRadio");
    }

    $("#appraCon").change(function () {
        $("#samples").empty();
    });

    function selectReportToSample() {
        var _flag = $("#appraCon").val();
        var _appraCon;
        if (_flag == "合法出版物") {
            _appraCon = true;
        } else if (_flag == "非法出版物") {
            _appraCon = false;
        }
        var register = $("#registerId").val();
        if (register == null || register.length == 0) {
            $.modal.alertWarning("请选择案件");
        } else {
            $.modal.open("关联样本", "/publish/identsample/identsampleCheck?registerId=" + register + "&appraCon=" + _appraCon);
        }
    }

    $("input[name='acceptTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
    var handle = null;
    $(document).ready(function () {
        handle = setInterval(function () {
            fileAfterInitial();
            initApproval();
            $('input.form-control').attr('readonly', true);
            $('textarea.form-control').attr('readonly', true);
            $('.file-caption-main').remove();
            $('input[name="publishingTime"]').attr("disabled", true);
            $('.btn-file').remove();
            $('#appraCon').attr('readonly', true).attr('disabled', true);
            $('#sendUnitId').attr('disabled', true);
            $('button.close').remove();
            $('.file-actions button[title="删除文件"]').remove();
            if ($('input.form-control').attr('readonly')) {
                clearInterval(handle);
            }
        }, 800);

        var _appraCon = $("#GetAppraConInfo").val();
        $("#appraCon").val(_appraCon);
        $("#ChangeContent").empty();
        getChangeContent(_appraCon);
        var _sampleIds = $("#sampleIds").val();
        if ($.common.isNotEmpty(_sampleIds)){
            $.ajax({
                type: "get",
                url: ctx + "publish/identsample/listByIds/" + _sampleIds,
                dataType: 'json',
                success: function (result) {
                    setSamnples(result.rows);
                },
                error: function (error) {
                    $.modal.alertWarning("查询鉴定受理登记记录失败！");
                }
            });
        }

        $("#appraCon").change(function () {
            var selected = $(this).children('option:selected').val();
            getChangeContent(selected);
            $("input[name='sampleIds']").val('')
        });

        $('.summernote').summernote({
            lang: 'zh-CN',
            callbacks: {
                onChange: function (contents, $edittable) {
                    $("input[name='" + this.id + "']").val(contents);
                },
                onImageUpload: function (files) {
                    var obj = this;
                    var data = new FormData();
                    data.append("file", files[0]);
                    $.ajax({
                        type: "post",
                        url: ctx + "common/upload",
                        data: data,
                        cache: false,
                        contentType: false,
                        processData: false,
                        dataType: 'json',
                        success: function (result) {
                            if (result.code == web_status.SUCCESS) {
                                $('#' + obj.id).summernote('insertImage', result.url);
                            } else {
                                $.modal.alertError(result.msg);
                            }
                        },
                        error: function (error) {
                            $.modal.alertWarning("图片上传失败。");
                        }
                    });
                }
            }
        });
    });

    /* 审核 */
    function submitApproval() {
        var options = {
            title: '鉴定报告审核',
            width: "550",
            height: "300",
            url: ctx + "publish/report/audit",
            callBack: function (index, layero) {
                var body = layer.getChildFrame('body', index);
                /*审核状态 1:未通过 3:待审核 5:通过*/
                var status = body.find('input[name="auditStatus"]:checked').val();
                var remark = body.find('[name="remark"]').val();
                var formData = {
                    "taskRecordId": [[${idReport.id}]],
                    "taskStatus": status,
                    "approvalReason": remark,
                    "taskApprovalLevel": [[${idReport.approvalLevel}]],
                }
                $.operate.post(window.location.origin + "/publish/approval/handleTaskApproval", formData, function (data) {
                    console.log(data);
                    if (data.code == 0) {
                        setTimeout(function () {
                            reloadAllIframe();
                            closeItem();
                        }, 1000);
                    } else {
                        layer.alert(data.msg, {icon: 9});
                    }
                });
                layer.close(index);
            }
        };
        $.modal.openOptions(options);
    }


    function getChangeContent(appraCon) {
        var samepleId = 'legal'
        if (appraCon == "合法出版物") {
            samepleId = 'legal';
        } else if (appraCon == "非法出版物") {
            samepleId = 'illegal';
        }
        var htmls = $(eval(samepleId)).html();
        $("#ChangeContent").empty();
        $("#ChangeContent").append(htmls);
    }

    var sca = function (event) {
        $("input[name='" + event.currentTarget.id + "']").val("");
        sca = function () {
        }
    }

    // 上传
    // $(".file-upload").each(function (i) {
    //     var vals = new Array()
    //     var preList = new Array();
    //     if ($.common.isNotEmpty($("input[name='" + this.id + "']").val())) {
    //         var str = $("input[name='" + this.id + "']").val();
    //         var strs = new Array();
    //         strs = str.split(",");
    //         for (i = 0; i < strs.length; i++) {
    //             vals[i] = ctx.slice(0, ctx.length - 1) + strs[i];
    //         }
    //
    //     }
    //     var previewJson = preList;
    //     var preConfigList = new Array();
    //     for (var i = 0; i < vals.length; i++) {
    //         var array_element = vals[i];
    //         var name = vals[i].substring(vals[i].lastIndexOf("/") + 1);
    //         var tjson = {
    //             caption: name, // 展示的文件名
    //             width: '100px',
    //             alt: array_element,
    //             extra: {id: 100}
    //         };
    //         preConfigList[i] = tjson;
    //     }
    //     $(this).fileinput({
    //         uploadUrl: '/common/upload',
    //         initialPreviewAsData: true,
    //         initialPreview: vals,
    //         maxFileCount: 0,
    //         showUpload: false,
    //         showRemove: true,
    //         maxFileSize: 30000,
    //         autoReplace: true,
    //         //allowedFileExtensions: ['jpg', 'png', 'bmp', 'jpeg'],
    //         showUpload: false, //是否显示上传按钮
    //         showCaption: true,//是否显示标题
    //         browseClass: "btn btn-primary hide",//按钮样式
    //         dropZoneTitle: " ",
    //         otherActionButtons: '<button type="button" class="kv-file-down btn btn-sm btn-default" {dataKey} title="下载附件"><i class="fa fa-cloud-download"></i></button>',
    //         layoutTemplates: {
    //             actionDelete: '', //去除上传预览的缩略图中的删除图标
    //             actionUpload: '',//去除上传预览缩略图中的上传图片图标；
    //             //     actionZoom:''   //去除上传预览缩略图中的查看详情预览的缩略图标。
    //         },
    //         previewFileIcon: '<i class="fa fa-file-o text-info"></i>',
    //         preferIconicPreview: true,// 是否优先显示图标  false 即优先显示图片
    //         previewFileIconSettings: {
    //             'docx': '<i class="fa fa-file-word-o text-primary"></i>',
    //             'doc': '<i class="fa fa-file-word-o text-primary"></i>',
    //             'xlsx': '<i class="fa fa-file-excel-o text-success"></i>',
    //             'xls': '<i class="fa fa-file-excel-o text-success"></i>',
    //             'pptx': '<i class="fa fa-file-powerpoint-o text-danger"></i>',
    //             'ppt': '<i class="fa fa-file-powerpoint-o text-danger"></i>',
    //             'pdf': '<i class="fa fa-file-pdf-o text-danger"></i>',
    //             'zip': '<i class="fa fa-file-archive-o text-muted"></i>',
    //             'sql': '<i class="fa fa-file-word-o text-primary"></i>',
    //             'txt': '<i class="fa fa-file-text-o text-info"></i>',
    //             'rtf': '<i class="fa fa-file-text-o text-info"></i>',
    //         },
    //         initialPreviewConfig: preConfigList
    //     }).on('filebatchselected', function (event, data, id, index) {
    //         $(this).fileinput("upload");
    //     }).on('fileuploaded', function (event, data, previewId, index) {
    //         //若重新上传文件，清空当前文件路径,只执行一次清空函数
    //         sca(event);
    //         if ($("input[name='" + event.currentTarget.id + "']").val() == "") {
    //             $("input[name='" + event.currentTarget.id + "']").val(data.response.fileName);
    //         } else {
    //             $("input[name='" + event.currentTarget.id + "']").val($("input[name='" + event.currentTarget.id + "']").val() + ',' + data.response.fileName);
    //         }
    //     }).on('filecleared', function (event, id, index) {
    //         $("input[name='" + event.currentTarget.id + "']").val('')
    //     }).on('filesuccessremove', function (event, id, index) {
    //         var fileUrlList = $("input[name='" + event.currentTarget.id + "']").val().split(",");
    //         fileUrlList.splice(index, 1);
    //         $("input[name='" + event.currentTarget.id + "']").val(fileUrlList);
    //     }).on('filedeleted', function (event, id, index) {
    //         $("input[name='" + event.currentTarget.id + "']").val('')
    //     }).on('filepreremove', function (event, id, index) {
    //         var str_after = index.split('_')[1];
    //         var fileUrlList = $("input[name='" + event.currentTarget.id + "']").val().split(",");
    //         fileUrlList.splice(str_after, 1);
    //         $("input[name='" + event.currentTarget.id + "']").val(fileUrlList);
    //     });
    //     // $(this).fileinput('_initFileActions');
    // });

    $(document).ready(function () {
        var fileConfig={
            uploadUrl: '/common/upload',
            maxFileSize:30000,
            browseClass:'btn btn-primary',
            dropZoneTitle:" ",
        }
        $.common.uploadFileInput(fileConfig,".file-upload","input[name='publishOps']");

    });


    /**
     * 其他按钮（如下载）绑定时间
     */
    $(document).on('click', '.kv-file-down', function (e, id, index) {
        var download = "";
        // 获取父级DIV
        var fileIndex = $(this).parents(".file-preview-frame").attr("data-fileindex");

        var fileValue = $(this).parents(".col-sm-10").children("input").val();
        if (fileIndex) {
            var number = fileIndex.match(/\d/);
            if (number) {
                download = fileValue.split(",")[number];
            }
        }
        var name = download.substring(download.lastIndexOf("/") + 1);
        if (download != "") {
            downloadFile(download, name);
        }
    });

    function downloadFile(url, name) {
        var a = document.createElement("a");
        a.download = name;
        a.href = url;
        $("body").append(a); // 修复firefox中无法触发click
        a.click();
        $(a).remove();
    };


    function fileShowInt() {
        $(".file-upload-show").each(function (i) {
            var vals = new Array()
            if ($("input[name='" + this.id + "']").val() != null) {
                var str = $("input[name='" + this.id + "']").val();
                var strs = new Array();
                strs = str.split(",");
                for (i = 0; i < strs.length; i++) {
                    vals[i] = ctx.slice(0, ctx.length - 1) + strs[i];
                }
            }


            $(this).fileinput({
                uploadUrl: '/common/upload',
                maxFileCount: 10,
                initialPreviewAsData: true,
                initialPreview: vals,

                showUpload: false,
                //showRemove : false,
                allowedPreviewTypes: ['image'],
                maxFileSize: 5000,
                autoReplace: true,
                allowedFileExtensions: ['jpg', 'png', 'bmp', 'jpeg'],
                showUpload: false, //是否显示上传按钮
                showCaption: false,//是否显示标题
                dropZoneTitle: " ",
                browseClass: "btn btn-primary hide",//按钮样式
                showBrowse: false,

                layoutTemplates: {
                    actionDelete: '', //去除上传预览的缩略图中的删除图标
                    // actionUpload: '',//去除上传预览缩略图中的上传图片图标；
                    //actionZoom:''   //去除上传预览缩略图中的查看详情预览的缩略图标。
                },
            }).on('filebatchselected', function (event, data, id, index) {
                $(this).fileinput("upload");
            }).on('fileuploaded', function (event, data, previewId, index) {
                // data.response.url   data.response.fileName
                $("input[name='" + event.currentTarget.id + "']").val(data.response.fileName)
            }).on('fileremoved', function (event, id, index) {
                $("input[name='" + event.currentTarget.id + "']").val('')
            }).on('filesuccessremove', function (event, id, index) {
                $("input[name='" + event.currentTarget.id + "']").val('')
            }).on('filedeleted', function (event, id, index) {
                $("input[name='" + event.currentTarget.id + "']").val('')
            });

        })
    }


    // 设置
    function setReport(rows) {
        var _sendUnit = [];
        var _documentNum = [];
        var _category = [];
        var _id = [];
        rows.forEach(function (item) {
            console.log(item.sendUnit)
            _id.push(item.id);
            _sendUnit.push(item.sendUnit);
            _documentNum.push(item.documentNum);
            _category.push(item.category);
        })
        $('#registerId').val(_id.join(','));
        $('#sendUnitId').val(_sendUnit.join(','));
        $('#documentNum').val(_documentNum.join(','));
        $('#category').val(_category.join(','));

    }

    // 设置
    function setLegal(rows) {
        var _title = [];
        var _id = [];
        rows.forEach(function (item) {
            _title.push(item.title);
            _id.push(item.id);
        })
        $('#by3').val(_title.join(','));
        $('#lawId').val(_id.join(','));
    }

    // 设置
    // function setReport(rows){
    //     var _sampleId=[];
    //     var _photo=[];
    //
    //     rows.forEach(function(item){
    //
    //         _sampleId.push(item.id);
    //         _photo.push(item.documentNum);
    //
    //     })
    //
    //
    //
    //     $('#documentNum').val(_sampleId.join(','));
    //     $('#category').val(_category.join(','));
    //
    // }


    // 设置
    function setSamnples(rows) {

        var _sampleId = [];
        var _sampleName = [];
        var _publishInfo = [];
        var _publishInfoText = [];
        var i = 1;
        var samples = []
        var content = ""
        person = new Object();
        rows.forEach(function (item) {
            _sampleId.push(item.id);
            _sampleName.push(item.sampleName);
            _publishInfo.push(item.frontCover);
            _publishInfoText.push(item.publishInfoText);


            var publishInfoText = "";
            if (item.publishInfoText == null) {
                publishInfoText = ""
            } else {

                publishInfoText = valueReplace(item.publishInfoText.replace(new RegExp("\r\n", "gm"), ""))
            }
            // sameplestring=sameplestring+'{"sampleName":"'+item.sampleName+'","publishInfo":"'+item.publishInfo+'"}'+',';
            var publishIndex = "imageShow" + i
            var fronCover="";
            fronCover=item.frontCover!=null?item.frontCover:"";
            content = content + '{' +
                '"sampleName":"' + item.sampleName + '",' +
                '"publishInfo":"' + fronCover + '",' +
                '"publishInfoText":"' + publishInfoText + '"' +

                '},';
        })
        content = content.substring(0, content.length - 1);       //将字符串转成JSON对象
        var data = '{' +
            '"samples":[' +
            content +
            ']' +
            '}';
        getSampleInfo(JSON.parse(data));
        $('#sampleIds').val(_sampleId.join(','));

        // 初始化相应图片

        // fileShowInt()


    }

    function valueReplace(v) {
        if (v.indexOf("\"") != -1) {
            v = v.toString().replace(new RegExp('(["\"])', 'g'), "\\\"");
        } else if (v.indexOf("\\") != -1)
            v = v.toString().replace(new RegExp("([\\\\])", 'g'), "\\\\");
        return v;
    }

    function showSlelect() {
        $.modal.open("法律条文", "/publish/provisions/provisionsRadio");
    }

    function getSampleInfo(data) {
        var str = template("samplesTemplate", data); //第一个参数是模板的id，第二个参数是data数据
        $("#samples").empty()
        $("#samples").append(str);
        fileShowInt();
    }

    // 刷新 iframe
    function reloadAllIframe() {
        var iframe = window.parent.document.querySelectorAll('iframe');
        for (var i = 0, end = iframe.length; i < end; i++) {
            if (iframe[i].getAttribute("data-id") == "/publish/report") {
                iframe[i].contentWindow.location.reload();
                break;
            }
        }
    }

    function fileAfterInitial() {
        var fileConfig={
            uploadUrl: '/common/upload',
            maxFileSize:30000,
            browseClass:'btn btn-primary',
            dropZoneTitle:"拖拽文件到这里",
        }
        $.common.uploadFileInput(fileConfig,".file-uploadAfter","input[name='copyrightRecord']");
    }

</script>
</body>

<!--隐藏模块-->
<div class="hidden">
    <!--    合法-->
    <div id="legal">
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label class="col-sm-2 control-label is-required">鉴定内容：</label>
                    <div class="col-sm-10">
                        <textarea name="identiContent" maxlength="500" class="form-control"
                                  rows="5" required>[[${idReport.identiContent}]]</textarea>
                    </div>
                </div>
            </div>
        </div>

    </div>

    <!--    非法-->
    <div id="illegal">
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label ">简要案情：</label>
                    <div class="col-sm-8">
                        <input name="briefCase" th:value="${idReport.briefCase}" class="form-control" type="text">
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label class="col-sm-2 control-label is-required">鉴定内容：</label>
                    <div class="col-sm-10">
                        <textarea name="identiContent" maxlength="500" class="form-control"
                                  rows="5" required>[[${idReport.identiContent}]]</textarea>
                    </div>
                </div>
            </div>
        </div>


        <div class="row">

            <div class="row">
                <div class="col-md-12">
                    <div class="form-group">
                        <label class="col-sm-2 control-label ">样本版权记录：</label>
                        <div class="col-sm-10">
                            <!--             type="hidden"  class="myhide"          width设置为0，高度设置为0.5px-->
                            <input name="copyrightRecordEx" class="form-control" type="text" th:value="${idReport.copyrightRecordEx}">
                            <input name="copyrightRecord" th:value="${idReport.copyrightRecord}" style="visibility: hidden;" >
                            <br/>
                            <div class="file-loading">
                                <input class="form-control file-uploadAfter" multiple id="copyrightRecord" name="file" type="file" >
                            </div>
                        </div>
                    </div>
                </div>
            </div>

<!--            <div class="col-sm-6">-->
<!--                <div class="form-group">-->
<!--                    <label class="col-sm-4 control-label ">样本版权记录：</label>-->
<!--                    <div class="col-sm-8">-->
<!--                        <input name="copyrightRecord" th:value="${idReport.copyrightRecord}" class="form-control"-->
<!--                               type="text">-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->

<!--            <div class="col-sm-6">-->
<!--                <div class="form-group">-->
<!--                    <label class="col-sm-4 control-label is-required">鉴定情况：</label>-->
<!--                    <div class="col-sm-8">-->
<!--                        <input name="identiSituation" th:value="${idReport.identiSituation}" class="form-control"-->
<!--                               type="text">-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->

        </div>

        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label class="col-sm-2 control-label ">鉴定情况：</label>
                    <div class="col-sm-10">
                        <textarea name="identiSituation" maxlength="500" class="form-control" placeholder=""
                                  rows="5" >[[${idReport.identiSituation}]]</textarea>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">法律条文：</label>
                    <div class="col-sm-8">
                        <input id="by3" name="by3" th:value="${idReport.by3}" readonly placeholder="请选择法律条文"

                               class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <div class="col-sm-8">
                        <input id="lawId" name="lawId" th:value="${idReport.lawId}" class="hidden" type="text" required>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</html>
<!--数据模板-->
<script type="text/html" id="samplesTemplate">
    {{each samples as sample i}}
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label ">样本名称：</label>
                <div class="col-sm-8">
                    <input name="expertName" value="{{sample.sampleName}}" readonly class="form-control" type="text">
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label ">封面：</label>
                <input type="hidden" name="imageShow{{i}}" value="{{sample.publishInfo}}">
                <div class="col-sm-8">
                    <div class="file-loading">
                        <input id="imageShow{{i}}" class="form-control file-upload-show hidden" multiple
                               type="file">
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="form-group">
                <div class="col-sm-12">
                        <textarea id="ocr{{i}}" rows="10" class="form-control" placeholder=""
                        >{{sample.publishInfoText}}</textarea>
                </div>
            </div>
        </div>

    </div>
    {{/each}}
</script>

